<?php
session_start();
if($_SESSION['authority']!=1)
	header('location:index.html');
?>


	<select id="sel" name="check_status" onchange="change_check_status(<?php echo $_POST['aid'] ?>)">
<!--PHP-->
<?php
include '../class/article.class.php';
include '../class/connect.inc.php';
$row=$mysqli->query('select check_status from blog where id='.$_POST['aid'])->fetch_assoc();
if(!$row)
	die('<script>window.close()</script>');
$detail=new Article('index.html');
$d=$detail->getBlogDetail($_POST['aid'],$row['check_status']);
$check1='';
$check2='';
switch($row['check_status']){
	case 'checked': $check1='selected';break;
	case 'checking': $check2='selected';break;
}
$opt='<option value="checked" '.$check1.'>checked</option>';
$opt.='<option value="checking" '.$check2.'>checking</option>';
echo $opt;
?>
		</select>
<?php
if($row['check_status']=='checking')
	echo '<button onclick="deleteArticle('.$_POST['aid'].')" class="btn">删除</button>';

?>
		<div class="row-fluid">
			<div id="maincontent" class="span9">
<?php
$output='<div class="articles"><ul id="display_articles">';
$output.='<li id="article_title">'.$d['title'].'</li>';
$output.='<li><a href="#">'.$d['writer'].'</a>&nbsp;&nbsp;';
$output.='创建时间：'.date('Y-m-d H:i:s',$d['create_time']).'</a>&nbsp;&nbsp;';
$output.='点击量：'.$d['click_count'].'</li>';
$output.='<li>'.$d['content'].'</li>';
$output.='</ul></div>';
echo $output;
?>
